+---------------------------------------------------------------------------+
|                  SCENERY MAKER: CUSTOMIZING LIBRARY OBJECTS               |
+---------------------------------------------------------------------------+

SML files are written in pure Scenery Maker source code. All commands useable
in .SM files can also be used here.

The main difference are some metacommands. All metacommands are inserted as
comments, SC will decode some special symbols that must be placed exacly 
after the semicolon (;).

Metacommands you can use within SC are very simple:

           ! = usually SC shows, next to the object its MS-DOS file name; 
               if you want to have a different, clearer name, you can use 
               this metacommand;
           
           ? = asks a value that will be used by the remaining code 
               as a variable;
  
  "any text" = the text you want to show to the user when he has to 
               type a parameter or that will be used as a reference
               for the object name;
               
       [HDG] = if SC finds this label within the "text" string it will 
               enable the user to define the heading of the object in 
               the standard way (like when giving the building heading).

The "!" and "?" metacommands MUST be placed right after the ";" on the 
second colon. Now let see some examples to clarify their use. 
If you want to display a text within SC, you can insert the following 
metacommand:

;! "The following object is a house"

If you want that the user types a value that you will use as a variable 
in the code, just write:

;? "Tower Height: " = Tower_Height

Where "Tower_Height" is the variable name you will then use in the object.
Note: SC will accept ONLY integer numeric values, also you can define only 
TEN parameters for each library object.

In the following example:

;? "Direction: [HDG]" = Towtruck_Heading

The user will define the heading of the towtruck moving the mouse on the 
screen, like when he inserts a building.


The basic structure of the SML files is the following:

        (1) Text display command
        (2) User input
        (3) MACRO definition *without* parameters
        (4) SM Code
        (5) ENDMACRO

;! "Output Description to SC"
;? "1st user input: "=Value_1
;? "2nd user input: "=Value_2
;? "3rd user input: "=Value_3
;? "4th user input: "=Value_4
;? "5th user input: "=Value_5
;? "6th user input: "=Value_6
;? "7th user input: "=Value_7
;? "8th user input: "=Value_8
;? "9th user input: "=Value_9
;? "10th user input: "=Value_10
;
; Comment Line
;
MACRO LibraryObject

    ; Scenery Maker Code

ENDMACRO


Note: You can define any number of macros within an SML file, the main macro
*must* be the last one defined in the file.

Here follows an example of two user defined macros used to build a city.
Please note that in the example only "CreateCity" will be recognized and 
called by SC, while "LittleHouse" is used by "CreateCity". 

MACRO LittleHouse( X_Offset, Y_Offset )
    ; Scenery MAKER code that defines a little house
ENDMACRO

MACRO CreateCity
    LittleHouse ( 100, 200)
    LittleHouse ( 320, 130)
    LittleHouse ( 50, -50)
    LittleHouse ( 75, -702)
ENDMACRO

Note: When more than one macro is defined within an SML file, the last one 
MUST be left *without* parameters. The others can have them.



All Rights reserved.
(c) 1995,1996 Enrico Schiratti, LAGO
Scenery MAKER is (c) 1995,1996 Simula FlightWare, LAGO. 
Network drivers are (c) 1995,1996 Simon Hradecky, NOMISSOFT. 
Scenery Budapest and Scenery Delhi are (c) 1995,1996 Andras Kozma, LAGO. 
Microsoft and MS-DOS are either registered trademarks or trademarks of 
Microsoft Corporation in the United States and/or other countries. 
Flight Simulator is a trademark of Bruce A. Artwick. 
All other products and brands are trademarks or registered trademarks of 
their respective owners.

-----------------------------------------------------------------------------
Written by Enrico Schiratti
*** END OF DOCUMENT ***
-----------------------------------------------------------------------------

